package com.chen.popj.entity;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 用户信息
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class User {
    private Integer id; //用户唯一标识
    @Pattern(regexp = "^\\S{2,10}$")
    private String username; //用户名
    private String password; //密码
    private Integer role;
    private String avatar; //比赛时的id
    private LocalDateTime createTime; //创建时间
    @Email
    private String email;//电子邮箱

}
